var prefix = ctx + "module/orderDeal"

$(function() {
	var columns = [{
            checkbox: true
        },
				{
			field : 'order.orderId', 
			title : '序号' 
		},
				{
			field : 'order.orderNum', 
			title : '订单号' 
		},
				{
			field : 'order.fullName', 
			title : '产品' 
		},
				{
			field : 'order.typeName', 
			title : '产品名称' 
		},
				{
			field : 'productInfo.productPrice', 
			title : '金额' 
		},
				{
			field : 'customerInfo.name', 
			title : '客户' 
		},
				{
			field : 'order.salesUserName', 
			title : '业务员' 
		},
				{
			field : 'refundsTime', 
			title : '退单时间' 
		},
		        {
            title: '操作',
            align: 'center',
            formatter: function(value, row, index) {
            	var actions = [];
				actions.push('<a class="btn btn-warning btn-sm ' + editFlag + '" href="#" title="" mce_href="#" onclick="edit(\'' + row.orderId + '\')"><i class="fa fa-search"></i></a> ');
				return actions.join('');
            }
        }];
	var url = prefix + "/list";
	$.initTable(columns, url);
});

/*退单详情信息*/
function edit(orderId) {
    var url = prefix + '/edit/' + orderId;
    layer_showAuto("退单详情", url);
}